<template>
  <div>
    <el-form
      ref="form"
      :model="params"
      label-width="100px"
      class="demo-ruleForm"
    >
      <el-form-item label="role name" prop="roleName">
        <el-input
          v-model="params.roleName"
          style="width: 200px"
          maxlength="100"
          size="small"
          placeholder="enter role name please"
        />
        <el-button
          type="primary"
          size="small"
          style="margin-left: 15px;"
          @click="query"
        >Query</el-button>
        <el-button
          type="primary"
          size="small"
          @click="add"
        >Add Role</el-button>
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      params: {
        roleName: ''
      }
    }
  },

  methods: {
    query() {
      this.$emit('submit')
    },

    add() {
      this.$emit('add')
    }
  }
}
</script>
